/**
 * 
 */
package com.zy.cat.entity.dev.garden.resp;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.RequiredArgsConstructor;

/**
 * @author sunyuancui
 * @date   2020年12月29日
 * 
 */
@Data
@Table(name="zy_cat_user_tree_grade")
@RequiredArgsConstructor
@AllArgsConstructor
@Entity
@ApiModel("用户等级实体类")
public class CatUserTreeGradeResp{
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(columnDefinition = "int(10) NOT NULL COMMENT '当前等级'")
	@ApiModelProperty(value = "当前等级", example = "")
    private Integer level; 
	
	@Column(columnDefinition = "int(10) DEFAULT NULL COMMENT '所需总肥料'")
	@ApiModelProperty(value = "所需总肥料", example = "")
    private Integer fertilizerTotal;
	
	@Column(columnDefinition = "int(10) DEFAULT NULL COMMENT '总等级数'")
	@ApiModelProperty(value = "总等级数", example = "")
    private Integer levelTotal; 
	
	@Column(columnDefinition = "int(10) DEFAULT NULL COMMENT '单次施肥量'")
	@ApiModelProperty(value = "单次施肥量", example = "")
    private Integer onceFertilizer;
	
	@Transient
	@ApiModelProperty(value = "等级列表", example = "{}")
	private List<UserTreeGrade> LevelList;

	
	@Data
	@RequiredArgsConstructor
	@AllArgsConstructor
	public static class UserTreeGrade{
		
		@Id
		@GeneratedValue(strategy=GenerationType.IDENTITY)
		@Column(columnDefinition = "int(10) NOT NULL COMMENT '当前等级'")
		@ApiModelProperty(value = "当前等级", example = "")
	    private Integer level; 
		
		@Column(columnDefinition = "int(10) DEFAULT NULL COMMENT '所需总肥料'")
		@ApiModelProperty(value = "所需总肥料", example = "")
	    private Integer fertilizerTotal;
	}
	
	/**
	 * @param level2
	 */
	public CatUserTreeGradeResp(Integer level) {
		// TODO Auto-generated constructor stub
		this.level=level;
	}

}
